<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-07-31 17:46:49
 * @LastEditTime : 2019-12-25 09:45:46
 * @LastEditors  : Please set LastEditors
 -->
<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport"
		content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title>Hello APP</title>
	<link rel="stylesheet" type="text/css" href="../../css/vant.css">
	<link rel="stylesheet" type="text/css" href="../../css/base.css" />
	<script type="text/javascript" src="../../script/jquery.js"></script>
	<script type="text/javascript" src="../../script/layer/mobile/layer.js"></script>
	<script type="text/javascript" src="../../script/vue.min.js"></script>
	<script type="text/javascript" src="../../script/vant.min.js"></script>
	<script type="text/javascript" src="../../script/fastclick.js"></script>
	<script type="text/javascript" src="../../script/base.js"></script>
	<style type="text/css">
		html,
		body,
		#app,
		.init-full {
			height: auto;
		}

		.init-full {
			background: rgba(0, 0, 0, .7);
			border-radius: 6px;
			overflow: hidden;
		}

		.van-cell {
			background: transparent;
			color: #fff;
			padding: 4px 16px;

		}

		.van-cell__value {
			color: #fff;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		.van-cell:not(:last-child)::after {
			border-bottom: 0;
		}
	</style>
</head>

<body>
	<div id="app" v-cloak>
		<div class="init-full" @click="intoDetail">
			<van-cell title="客户名称" :value="customerData.name">
				<div slot="right-icon">
						<van-icon name="ellipsis" color="#rgba(255,255,255,.7)" size="16px" style="vertical-align: middle;"></van-icon>
				</div>
				
			</van-cell>
			<van-cell title="联系方式">
				<a style="color:#3cd2ff;text-decoration: underline;" :href="'tel:' + customerData.NTel"
					@click.stop="">{{customerData.NTel}}</a>
			</van-cell>
			<van-cell title="客户地址" :value="customerData.Address"></van-cell>
		</div>
	</div>
</body>

<script type="text/javascript">
	var vm;
	apiready = function () {
		//$('.init-full').show();

		api.addEventListener({
			name: 'setcustomerData'
		}, function (ret, err) {
			vm.customerData = ret.value.customerData;
		})

		var customerData = api.pageParam.customerData;

		vm = new Vue({
			el: '#app',
			data: {
				customerData: customerData
			},
			created: function () {

			},
			methods: {
				intoDetail() {
					var that = this;
					api.openWin({
						name: 'customersDetail',
						url: '../customersDetail.html',
						reload: true,
						slidBackEnabled: false,
						pageParam: {
							customerData: that.customerData,
							fromVisit:true
						}
					})
				}
			}
		})
	};
</script>

</html>